package main

import (
	"gitee.com/liyp_admin/gnet"
	_ "gitee.com/liyp_admin/gnet/example/crawler"
	"gitee.com/liyp_admin/gnet/example/netservice"
	"gitee.com/liyp_admin/gnet/gfile"
)

func init() {
	TestFun()
}

func main() {
	reqList := []string{"roleNum"}
	// gnet.Nolog("%v", reqList)
	var _ioservice = &netservice.IOserver{}
	gnet.Start(_ioservice, 1)
	gnet.Listen(10081, "", reqList)
	gnet.WaitClose()
}

func TestFun() {
	gfile.WriteFile("abc.txt", []byte("abc"), false)

	str, err := gfile.ReadFile("abc.txt")
	if err != nil {
		return
	}
	gnet.Warning(string(str))
}
